<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/4/9 0009
 * Time: 下午 20:19
 */

namespace Home\Controller;


use Think\Controller;

class SearchController extends BaseController
{
public function index(){
    $Conf = ['title'=>'搜索页','js'=>['list']];
    $this->assign('Conf',$Conf);

    $search=  $_GET['search'];

    $map['gname'] = array('like',"%$search%" );

    $searchData= m('goods')->where($map)->select();

    $this->assign('listPageData',$searchData);
//    dd($searchData);


    $this->display();
}

}